package design.graduation.novelwebsite.controller;



import design.graduation.novelwebsite.model.dto.ResultObj;
import design.graduation.novelwebsite.model.entity.IncludeBook;
import design.graduation.novelwebsite.service.IncludeBookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * @author: 洪少尉
 * @Date: 2020/3/23 20:17
 * @Description: 小说主页
 */

@RestController
@CrossOrigin
@RequestMapping("web")
public class IndexController {

	@Autowired
	private IncludeBookService includeBookService;

	/**
	 * 获取分类小说
	 */
	@RequestMapping("primaryClassification/{primaryClassification}")
	public ResultObj primaryClassification(IncludeBook includeBook){
		return includeBookService.queryBooksByPrimaryClassification(includeBook);
	}

}
